<?php defined('SYSPATH') or die('No direct script access.');

class Membutuhkan_Model extends Model {
	
	public function insert_membutuhkan($id_stok, $id_menu, $quantity) {
		$data = array('ID_stok'=>$id_stok,'ID_menu'=>$id_menu, 'quantity'=>$quantity);
		$this->db->insert('membutuhkan',$data);
	}
	
	public function get_all_membutuhkan() {
		return ($this->db->from('membutuhkan')->orderby('ID_menu')->get());
	}
	
	public function get_all_membutuhkan_by_menu($ID_menu) {
		return $this->db->from('membutuhkan')->where('ID_menu',$ID_menu)->get();
	}
}